package com.rxyb.authority.gateway.dto.role;

import com.rxyb.authority.gateway.dto.BaseReq;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 角色修改授权
 *
 * @author duyh
 * @date 2020/5/28
 */
@Data
public class AuthRoleReq extends BaseReq {

    /**
     * 角色Id
     */
    @NotNull
    @Size(max = 30, message = "roleId 不超过30位")
    @Pattern(regexp = "^(?!(\\d+)$)[\\u4e00-\\u9fffa-zA-Z\\d\\-_]+$", message = "roleId 不能为纯数字")
    private String roleId;

    /**
     * 角色类型
     */
    @Size(max = 999999)
    private List<String> menuIds;

}
